package com.lhf.util;

import lombok.Data;

import java.util.List;

/**
 * @author 尐痞猫
 * @date2021-06-23 17:44
 */
@Data
public class AllrecordsVo<T> {
    private Integer pageIndex ;//当前页
    private Integer pageSize;//每页条数
    private Integer totalSize;//总页数
    private Integer totalPage;//总条数
    private List<T> dataList;//数据

    public void resettotalNum(Integer totalSize) {
        if (totalSize!=0){
            this.totalSize = totalSize;
            this.totalPage = totalSize / this.pageSize;
            if(totalSize % this.pageSize != 0L) {
                ++this.totalPage;
            }
        }
    }



}
